using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class ContentInfo : GeneratedMessageLite<ContentInfo, ContentInfo.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<ContentInfo, ContentInfo.Builder>
		{
			private bool resultIsReadOnly;
			private ContentInfo result;
			protected override ContentInfo.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override ContentInfo MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override ContentInfo DefaultInstanceForType
			{
				get
				{
					return ContentInfo.DefaultInstance;
				}
			}
			public int StartPos
			{
				get
				{
					return this.result.StartPos;
				}
				set
				{
					this.SetStartPos(value);
				}
			}
			public int TotLen
			{
				get
				{
					return this.result.TotLen;
				}
				set
				{
					this.SetTotLen(value);
				}
			}
			public Builder()
			{
				this.result = ContentInfo.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(ContentInfo cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private ContentInfo PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					ContentInfo other = this.result;
					this.result = new ContentInfo();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override ContentInfo.Builder Clear()
			{
				this.result = ContentInfo.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override ContentInfo.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new ContentInfo.Builder(this.result);
				}
				return new ContentInfo.Builder().MergeFrom(this.result);
			}
			public override ContentInfo BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override ContentInfo.Builder MergeFrom(IMessageLite other)
			{
				if (other is ContentInfo)
				{
					return this.MergeFrom((ContentInfo)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override ContentInfo.Builder MergeFrom(ContentInfo other)
			{
				return this;
			}
			public override ContentInfo.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override ContentInfo.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(ContentInfo._contentInfoFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = ContentInfo._contentInfoFieldTags[num2];
					}
					uint num3 = num;
					if (num3 == 0u)
					{
						throw InvalidProtocolBufferException.InvalidTag();
					}
					if (num3 != 8u)
					{
						if (num3 != 16u)
						{
							if (WireFormat.IsEndGroupTag(num))
							{
								return this;
							}
							this.ParseUnknownField(input, extensionRegistry, num, text);
						}
						else
						{
							this.result.hasTotLen = input.ReadInt32(ref this.result.totLen_);
						}
					}
					else
					{
						this.result.hasStartPos = input.ReadInt32(ref this.result.startPos_);
					}
				}
				return this;
			}
			public ContentInfo.Builder SetStartPos(int value)
			{
				this.PrepareBuilder();
				this.result.hasStartPos = true;
				this.result.startPos_ = value;
				return this;
			}
			public ContentInfo.Builder ClearStartPos()
			{
				this.PrepareBuilder();
				this.result.hasStartPos = false;
				this.result.startPos_ = 0;
				return this;
			}
			public ContentInfo.Builder SetTotLen(int value)
			{
				this.PrepareBuilder();
				this.result.hasTotLen = true;
				this.result.totLen_ = value;
				return this;
			}
			public ContentInfo.Builder ClearTotLen()
			{
				this.PrepareBuilder();
				this.result.hasTotLen = false;
				this.result.totLen_ = 0;
				return this;
			}
		}
		public const int StartPosFieldNumber = 1;
		public const int TotLenFieldNumber = 2;
		private static readonly ContentInfo defaultInstance;
		private static readonly string[] _contentInfoFieldNames;
		private static readonly uint[] _contentInfoFieldTags;
		private bool hasStartPos;
		private int startPos_;
		private bool hasTotLen;
		private int totLen_;
		private int memoizedSerializedSize = -1;
		public static ContentInfo DefaultInstance
		{
			get
			{
				return ContentInfo.defaultInstance;
			}
		}
		public override ContentInfo DefaultInstanceForType
		{
			get
			{
				return ContentInfo.DefaultInstance;
			}
		}
		protected override ContentInfo ThisMessage
		{
			get
			{
				return this;
			}
		}
		public int StartPos
		{
			get
			{
				return this.startPos_;
			}
		}
		public int TotLen
		{
			get
			{
				return this.totLen_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasStartPos && this.hasTotLen;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasStartPos)
				{
					num += CodedOutputStream.ComputeInt32Size(1, this.StartPos);
				}
				if (this.hasTotLen)
				{
					num += CodedOutputStream.ComputeInt32Size(2, this.TotLen);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private ContentInfo()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] contentInfoFieldNames = ContentInfo._contentInfoFieldNames;
			if (this.hasStartPos)
			{
				output.WriteInt32(1, contentInfoFieldNames[0], this.StartPos);
			}
			if (this.hasTotLen)
			{
				output.WriteInt32(2, contentInfoFieldNames[1], this.TotLen);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasStartPos)
			{
				num ^= this.startPos_.GetHashCode();
			}
			if (this.hasTotLen)
			{
				num ^= this.totLen_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object object_0)
		{
			ContentInfo contentInfo = object_0 as ContentInfo;
			return contentInfo != null && (this.hasStartPos == contentInfo.hasStartPos && (!this.hasStartPos || this.startPos_.Equals(contentInfo.startPos_))) && (this.hasTotLen == contentInfo.hasTotLen && (!this.hasTotLen || this.totLen_.Equals(contentInfo.totLen_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<ContentInfo, ContentInfo.Builder>.PrintField("StartPos", this.hasStartPos, this.startPos_, writer);
			GeneratedMessageLite<ContentInfo, ContentInfo.Builder>.PrintField("TotLen", this.hasTotLen, this.totLen_, writer);
		}
		public static ContentInfo ParseFrom(byte[] data)
		{
			return ContentInfo.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private ContentInfo MakeReadOnly()
		{
			return this;
		}
		public static ContentInfo.Builder CreateBuilder()
		{
			return new ContentInfo.Builder();
		}
		public override ContentInfo.Builder ToBuilder()
		{
			return ContentInfo.CreateBuilder(this);
		}
		public override ContentInfo.Builder CreateBuilderForType()
		{
			return new ContentInfo.Builder();
		}
		public static ContentInfo.Builder CreateBuilder(ContentInfo prototype)
		{
			return new ContentInfo.Builder(prototype);
		}
		static ContentInfo()
		{
			ContentInfo.defaultInstance = new ContentInfo().MakeReadOnly();
			ContentInfo._contentInfoFieldNames = new string[]
			{
				"StartPos",
				"TotLen"
			};
			ContentInfo._contentInfoFieldTags = new uint[]
			{
				8u,
				16u
			};
			object.ReferenceEquals(micromsg.Proto.ContentInfo.Descriptor, null);
		}
	}
}
